﻿using System;

namespace Google.Analytics.Model
{
    /// <summary>
    /// Stores Authentication Token
    /// </summary>
    [Serializable]
    public class AuthState
    {
        /// <summary>
        /// Google Analytics username
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// Google Analytics password
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// Analytics token recieved after authentication
        /// </summary>
        public string QueryAuthenticationToken { get; set; }

        /// <summary>
        /// Creates new empty <c>AuthState</c> instance
        /// </summary>
        public AuthState()
        {

        }

        /// <summary>
        /// Creates new <c>AuthState</c> instance with auth token
        /// </summary>
        /// <param name="queryAuthenticationToken"></param>
        public AuthState(string queryAuthenticationToken) : this(null, null, queryAuthenticationToken)
        {

        }

        /// <summary>
        /// Creates new <c>AuthState</c> instance with auth token
        /// </summary>
        public AuthState(string username, string password, string queryAuthenticationToken)
        {
            QueryAuthenticationToken = queryAuthenticationToken;
            UserName = username;
            Password = password;
        }
    }
}